{% extends 'admin/admin_base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}


{% block title %} 用户查看 {% endblock%}

{% block page_content %}
<div class="page-header">
	<h1>用户查看</h1>
</div>

<form role="form" method='POST'>
<div class="form-group">
   <label for="name"></label>
   <input type="text" class="form-control" name="opt" placeholder="请输入查询关键字">
   <button type="submit" class="btn btn-default">提交</button>
</div>
</form>

<div>
<table class="table table-hover">
   <thead>
      <tr>
      	<th>用户ID</th>
         <th>用户名称</th>
         <th>邮箱</th>
         <th>角色</th>
         <th>邮箱验证</th>
         <th>关联人员</th>
         <th>操作</th>
      </tr>
   </thead>
   <tbody>
   	{% for lg_user in login_user_result %}
      <tr>
      	<td>{{ lg_user.id }}</td>
         <td>{{ lg_user.username }}</td>
         <td>{{ lg_user.email }}</td>
         <td>{{ lg_user.role_name }}</td>
         <td>{{ lg_user.confirmed }}</td>
         {% if lg_user.related_name %}
         <td>{{ lg_user.related_name }}</td>
         {% else %}
         <td><a href="{{ url_for('admin.login_user_related', id=lg_user.id) }}">点击关联</a></td>
         {% endif %}
         <td><a href="{{ url_for('admin.login_user_modify', id=lg_user.id) }}">设置角色</a></td>
      </tr>
    {% endfor %}
   </tbody>
</table
</div>
{% endblock %}

